/**
 * Reset some basic elements
 */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
hr,
dl,
dd,
ol,
ul,
figure {
  margin: 0;
  padding: 0;
}

/**
 * Basic styling
 */
body {
  font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family;
  color: $text-color;
  background-color: $background-color;
  -webkit-text-size-adjust: 100%;
  -webkit-font-feature-settings: "kern"1;
  -moz-font-feature-settings: "kern"1;
  -o-font-feature-settings: "kern"1;
  font-feature-settings: "kern"1;
  font-kerning: normal;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}


/**
 * Set `margin-bottom` to maintain vertical rhythm
 */
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
ul,
ol,
dl,
figure,
%vertical-rhythm {
  margin-bottom: $spacing-unit / 2;
}

::selection {
  background:$base-color; 
  color:$background-color;
}

::-moz-selection {
  background:$base-color; 
  color:$background-color;
}

::-webkit-selection {
  background:$base-color; 
  color:$background-color;
}

/**
 * `main` element
 */
main {
  display: block;
  /* Default value of `display` of `main` element is 'inline' in IE 11. */
}

/**
 * Images
 */
img {
  max-width: 100%;
  vertical-align: middle;
}

/**
 * Figures
 */
figure>img {
  display: block;
}

figcaption {
  font-size: $small-font-size;
}

/**
 * Lists
 */
ul,
ol {
  li {
    color: $content-p-color !important;
  }
  margin-left: $spacing-unit;
}

.content {
  ul {
    margin-top: 0px !important;
  }
  ol {
    margin-top: 0.4em !important;
  }
}

li {
  a {
    color: $base-color !important;
  }
  // list-style: none;

  >ul,
  >ol {
    margin-bottom: 0;
  }
}

/**
 * Headings
 */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: $base-font-weight;
  word-wrap:break-word; 
  word-break:break-all;
}
.content h2 {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e9ebec;
}
p, td, ol li {
  word-wrap:break-word; 
  word-break:break-all;
}

/**
 * Links
 */
a {
  color: $base-color;
  text-decoration: none;

  &:hover {
    color: $minor-color !important;
    text-decoration: none;
    cursor: pointer;
  }

  .social-media-list &:hover {
    text-decoration: none;

    .username {
      text-decoration: none;
    }
  }
}

.footer .content p {
  & strong a {
    color: black;

    &:hover {
      color: $base-color !important;
    }
  }
}

/**
 * Blockquotes
 */

.content {
  blockquote {
    position: relative;
    margin: 20px 0;
    border: 0;
    background-color: white !important;
    padding: 15px 0px 15px 50px !important;
    border-left: 2px solid $base-color !important;
    font-family: Segoe UI, "Microsoft Yahei" !important;
    box-shadow: 1px 10px 20px -15px rgba(0, 0, 0, 0.1) !important;

    P {
      margin-bottom: auto;
      text-shadow: 0.08em 0.15em 0.3em #1f314d1c;
    }

    &::before {
      content: "\201C";
      position: absolute;
      display: block;
      top: 0;
      left: -2px;
      width: 60px;
      height: 60px;
      font-size: 60px;
      line-height: 60px;
      color: $base-color;
      font-family: Courier, monospace;
      text-align: center;
      z-index: 1;
    }
  }
}

.content p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.8;
  color: $content-p-color !important;

  a {
    color: $base-color;
  }
}

/**
 * Code formatting
 */
pre,
code {
  @include relative-font-size(0.9375);
  border: 1px solid $grey-color-light;
  border-radius: 3px;
  background-color: #eef;
  color: $content-p-color !important;
}

code {
  padding: 1px 5px;
}

pre {
  padding: 8px 12px;
  overflow-x: auto;

  >code {
    border: 0;
    padding-right: 0;
    padding-left: 0;
  }
}

/**
 * Clearfix
 */
%clearfix:after {
  content: "";
  display: table;
  clear: both;
}



/**
 * Icons
 */

svg {
  font-size: 10px !important;
}

.svg-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  fill: #{$grey-color};
  padding-right: 5px;
  vertical-align: text-top;
}

.social-media-list {
  li+li {
    padding-top: 5px;
  }
}



/**
 * Tables
 */
table {
  margin-bottom: $spacing-unit;
  width: 100%;
  text-align: $table-text-align;
  color: lighten($text-color, 18%);
  border-collapse: collapse;
  border: 1px solid $grey-color-light;
  box-shadow: 11px 14px 20px -15px rgba(0, 0, 0, 0.1) !important;

  tr {
    &:nth-child(even) {
      background-color: $light-bule;
    }
  }

  th,
  td {
    padding: ($spacing-unit / 3) ($spacing-unit / 2);
  }

  th {
    background-color: $light-bule;
    border: 1px solid darken($grey-color-light, 4%);
    border-bottom-color: darken($grey-color-light, 12%);
  }

  td {
    border: 1px solid $grey-color-light;
  }
}